package com.listeningframework.boot.autoconfigure.orm.jpa.support;

import com.listeningframework.boot.domains.Pagination;
import com.listeningframework.boot.domains.Paging;
import com.listeningframework.boot.exception.BusinessException;

import java.io.Serializable;
import java.util.List;

/**
 * 
 * Listening Jpa Base Service Adapter
 *
 * @author lixining
 * @version $Id: ListeningJpaBaseServiceAdapter.java, v 0.1 2015年11月4日 下午5:40:43 lixining Exp $
 */
public class ListeningJpaServiceAdapter<T, ID extends Serializable> extends ListeningJpaService<T, ID> {
    /**
     * Select Page
     *
     * @param entity 分页参数对象
     * @param paging 分页页码信息
     * @return Pagination
     * @throws BusinessException 分页异常
     */
    public Pagination<T> page(T entity, Paging paging) throws BusinessException {
        return null;
    }

    /**
     * Save
     *
     * @param entity 保存对象
     * @return T 对象
     * @throws BusinessException 保存异常
     */
    public T save(T entity) throws BusinessException {
        return null;
    }

    /**
     * Delete
     *
     * @param id 数据主键
     * @throws BusinessException 删除异常
     */
    public void delete(ID id) throws BusinessException {
    }

    /**
     * Select
     * @param id 数据主键
     * @return T
     * @throws BusinessException 查询异常
     */
    public T select(ID id) throws BusinessException {
        return null;
    }

    /**
     * 动态参数过滤
     *
     * @param entity 过滤参数
     * @return List
     * @throws BusinessException 过滤异常
     */
    public List<T> filter(T entity) throws BusinessException {
        return null;
    }

}